
def	calcAC(pick) :
	'''
	calcaute arithmetic complexity for a pick
	'''
	count = len(pick)
	if count < 2 : return 0

	diff = []
	i = 0
	while i < count :
		a = pick[i]
		j = i + 1
		i = j
		while j < count :
			b = pick[j]
			j = j + 1
			d = abs(a - b)
			if d in diff : continue
			diff.append(d)

	ac = len(diff) - (count - 1)
	return ac

